

#ifndef GEMOVE_H
#define GEMOVE_H

#include "Event/EvtIf.h"
#include "Gene/GeneIf.h"

class IEntity;

//
//	Move provide moving ability for entity.
//	move controller is once a gene can be attached to and detached from an entity dynamically
//	Move controller is an gene, but we need more access to move controller, so we make this move gene resident 
//	in its host entity for ever, and we add more interface to make it available to be expose to the outside world
//
class TCOM_API  IMoveController : public IGene
{
public:
	virtual ~IMoveController(){}

	//
	//	do it now!
	//
	virtual bool send(IEvt* pEvt)   = 0;
	//
	//	do it later!
	//
	virtual bool post(IEvt* pEvt)   = 0;

	//
	//	state machine
	//	i want a state machine
	//
	virtual short getState()const	  = 0;
	virtual void  setState(short st)  = 0;

	//
	//	Periodically update gene logic, normally a gene will be detach when run out of its time to live.
	//
	virtual bool onUpdate(int nElapse)	= 0;

	//
	//	Speed modifier
	//
	virtual void	setSpeedModifier(const int& v)	=	0;
	virtual int		getSpeedModifier()const	=	0;

};


#endif //
